<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录页面</title>
    <link rel="stylesheet" href="/css/index.css">
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <script src="/js/jquery.1.11.1.min.js"></script>
    <style>

    </style>

</head>
<body>
<div class="register_head_on"></div>
<div class="register_head">
    <a href="index.html"><img src="/img/logo.jpg" alt=""></a>
    <div class="register_head_right">
        <p class="register_head_right_p1">小 米 商 城</p>
        <p class="register_head_right_p2">让每个人都享受科技乐趣</p>
    </div>
</div>

<form action="/login" method="post" id="form1" class="layui-form login-bottom" >
    <div class="register">
        <div class="register_boby">
            <div class="register_boby_min">
                <div class="register_boby_no1">
                    <div class="register_boby_no1_in">
                        <span style="color: #ff6700">账号登录 </span>
                        <span class="register_boby_sapn"> | </span>
                        <span> 扫码登录</span>
                    </div>
                </div>
                <div class="register_boby_no2">
                    <input type="text" name="memberName" id="memberName" lay-verify="required" placeholder="邮箱/手机号码/小米ID" value="admin1">
                    <input type="password" name="password" id="password" lay-verify="required" placeholder="密码" value="123456">
                    <div class="register_boby_no2_div">
                        <span onclick="form1.submit()" id="login">登录</span>
                    </div>
                </div>
                <div class="register_boby_no3">
                    <a href="javascript:void(0);" style="color: #ff6700">手机短信登录/注册</a>
                    <sapn class="register_boby_no3_span">
                        <a href="javascript:void(0);">立即注册</a>
                        <span>|</span>
                        <a href="javascript:void(0);">忘记密码?</a>
                    </sapn>
                </div>
                <div class="register_boby_no4">
                    <img src="/img/register02.jpg" alt="">
                </div>
            </div>
        </div>
    </div>
</form>

<div class="register_foot">
    <img src="/img/register03.jpg" alt="">
</div>

<!-- 引入依赖的js文件 -->
<script src="/layui/layui.js" charset="utf-8"></script>
<script src="/js/common.js"></script>

<script th:inline="none">
    layui.use(['layer', 'form'], function () {
        var layer = layui.layer;
        var form = layui.form;
        var $ = layui.jquery;

        // 进行登录操作
        $("#login").on("click", function (data) {
            data = data.field;
            if (data.memberName === '') {
                layer.msg('用户名不能为空');
                return false;
            }
            if (data.password === '') {
                layer.msg('密码不能为空');
                return false;
            }
            //如果两个属性都有值，则正常提交form表单到action地址
        });

    });

</script>


</body>
</html>